<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>显示数据</title>
</head>
<body>
<div>
    <h3 align="center">用户数据：</h3>
    <table border="1" align=center style="border-collapse: collapse">
        <thead>
        <tr style="text-align: center">
            <td>用户名</td>
            <td>地址</td>
            <td>性别</td>
            <td>生日</td>
            <td>
                <a th:href="@{/toinsert}">新增</a>
            </td>
        </tr>
        </thead>
        <tbody>
        <tr th:each="user:${userList}">
            <td th:text="${user.username}">未查询到</td>
            <td th:text="${user.p_addr}">未查询到</td>
            <td th:text="${user.gender}==1?'男':'女'">未查询到</td>
            <td th:text="${#dates.format(user.birth,'yyyy-MM-dd')}">未查询到</td>
            <td>
                <a th:href="@{/deleteById(pid=${user.pid})}">删除</a>
            </td>
            <td>
                <a th:href="@{/selectById(pid=${user.pid})}">修改</a>
            </td>
        </tr>
        </tbody>
    </table>
</div>
</body>
</html>